import axios from 'axios'
import request from '../index'

// http://musicapi.leanapp.cn/

/**
 * 获取用户音乐
 * @param userId {string | number}
 * @returns {Promise}
 */
export function getUserMusic(userId) {
  return request({
    url: '/music/list',
    params: {
      userId
    }
  })
}

/**
 * 根据音乐id获取歌词
 * @param id {string | number}
 * @returns {Promise}
 */
export function getMusicLyric(id) {
  return axios.get(`http://123.207.32.32:9001/lyric?id=${id}`)
}
